<template>
  <div class="content-table">
    <p class="title">成都轻备教育科技有限公司员工列表</p>
    <el-table
      :data="list"
      stripe
      border
      v-loading="loading"
      header-row-class-name="header-row"
    >
      <el-table-column prop="sysUserId" label="姓名"></el-table-column>
      <el-table-column prop="sysUserName" label="部门"></el-table-column>
      <el-table-column prop="gmtCreate" label="是否在职"></el-table-column>
      <el-table-column prop="gmtCreate" label="角色"></el-table-column>
      <el-table-column label="操作" width="150">
        <template slot-scope="scope">
          <el-button size="mini" @click="edit(scope.row)">交接</el-button>
          <el-popconfirm
            title="确定删除该记录吗？"
            class="ml-10"
            @confirm="del(scope.row)"
          >
            <el-button size="mini" type="danger" slot="reference"
              >删除</el-button
            >
          </el-popconfirm>
        </template>
      </el-table-column>
    </el-table>
    <div class="content-pagination">
      <el-pagination
        :layout="pagination.layout"
        :page-sizes="pagination.pageSizes"
        :current-page="page"
        :page-size="size"
        :total="total"
        @size-change="sizeChange"
        @current-change="currentChange"
      >
      </el-pagination>
    </div>
  </div>
</template>

<script>
import {TABLE_SETTING} from '@/config/setting.js'
export default {
  name: "TableArea",
  props:{
      page:{
          type:Number
      },
      size:{
          type:Number
      },
      total:{
           type:Number
      },
      loading:{
          type:Boolean
      },
      list:{
          type:Array
      }
  },
  data() {
    return {
        pagination:TABLE_SETTING.PAGINATION
    };
  },
  mounted() {
      console.log(TABLE_SETTING)
  },
  methods: {
    editRole(row) {
      return row;
    },
    sizeChange(){},
    currentChange(){},
  },
};
</script>

<style lang="scss" scoped>
.content-table {
  margin-top: 0;
}
.title {
  margin-bottom: 10px;
  margin-left: 10px;
  padding: 10px 0;
  border-bottom: 2px solid #00cc8b;
  display: inline-block;
}
</style>
